package com.xw.pt.system.model;

import core.base.BaseModel;
import java.util.Date;

@SuppressWarnings("serial")
public class Role extends BaseModel {

    /**
     * 角色名字
     * 表字段 : t_auth_role.name
     */
    private String name;

    /**
     * 角色标识
     * 表字段 : t_auth_role.role
     */
    private String role;

    /**
     * 
     * 表字段 : t_auth_role.gm_create
     */
    private Date gmCreate;

    /**
     * 
     * 表字段 : t_auth_role.gmt_modified
     */
    private Date gmtModified;

    /**
     * 获取 角色名字 字段:t_auth_role.name
     *
     * @return t_auth_role.name, 角色名字
     */
    public String getName() {
        return name;
    }

    /**
     * 设置 角色名字 字段:t_auth_role.name
     *
     * @param name the value for t_auth_role.name, 角色名字
     */
    public void setName(String name) {
        this.name = name == null ? null : name.trim();
    }

    /**
     * 获取 角色标识 字段:t_auth_role.role
     *
     * @return t_auth_role.role, 角色标识
     */
    public String getRole() {
        return role;
    }

    /**
     * 设置 角色标识 字段:t_auth_role.role
     *
     * @param role the value for t_auth_role.role, 角色标识
     */
    public void setRole(String role) {
        this.role = role == null ? null : role.trim();
    }

    /**
     * 获取  字段:t_auth_role.gm_create
     *
     * @return t_auth_role.gm_create, 
     */
    public Date getGmCreate() {
        return gmCreate;
    }

    /**
     * 设置  字段:t_auth_role.gm_create
     *
     * @param gmCreate the value for t_auth_role.gm_create, 
     */
    public void setGmCreate(Date gmCreate) {
        this.gmCreate = gmCreate;
    }

    /**
     * 获取  字段:t_auth_role.gmt_modified
     *
     * @return t_auth_role.gmt_modified, 
     */
    public Date getGmtModified() {
        return gmtModified;
    }

    /**
     * 设置  字段:t_auth_role.gmt_modified
     *
     * @param gmtModified the value for t_auth_role.gmt_modified, 
     */
    public void setGmtModified(Date gmtModified) {
        this.gmtModified = gmtModified;
    }

    /**
     * ,t_auth_role
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", name=").append(name);
        sb.append(", role=").append(role);
        sb.append(", gmCreate=").append(gmCreate);
        sb.append(", gmtModified=").append(gmtModified);
        sb.append("]");
        return sb.toString();
    }

    /**
     * ,t_auth_role
     *
     * @param that
     */
    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Role other = (Role) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getRole() == null ? other.getRole() == null : this.getRole().equals(other.getRole()))
            && (this.getGmCreate() == null ? other.getGmCreate() == null : this.getGmCreate().equals(other.getGmCreate()))
            && (this.getGmtModified() == null ? other.getGmtModified() == null : this.getGmtModified().equals(other.getGmtModified()));
    }

    /**
     * ,t_auth_role
     */
    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getRole() == null) ? 0 : getRole().hashCode());
        result = prime * result + ((getGmCreate() == null) ? 0 : getGmCreate().hashCode());
        result = prime * result + ((getGmtModified() == null) ? 0 : getGmtModified().hashCode());
        return result;
    }
}